/**
 * 
 */
package hb_Teach_InitObject_abstract;

/**
 * @author Jiang Zhiyan
 *
 * 2021年4月29日 上午11:12:02
 */
public abstract class Shape {
    private Point location; //定位的点
//    计算图像的面积
    public abstract double area();
//    判断一个点是否在图形的内部（提供相关的重载）
    public abstract boolean contain(Point p);
    
    public boolean contain(int x,int y) {
    	return this.contain(new Point(x,y));
    }
    
    public Point getLocation() {
    	return location;
    }
    
    public void setLocation(Point location) {
    	this.location= location;
    }
}
